<script>
import {defineComponent} from 'vue'

export default defineComponent({
  name: "UserAvatar",
  props: {
    user: {
      userId: Number,
      uname: String,
      imgUrl: String,
      self: Boolean
    }
  }
})
</script>

<template>
  <van-image
      :src="user.imgUrl"
      width="40px"
      height="40px"
      loading-icon="user-circle-o"
      error-icon="user-circle-o"
      icon-size="40"
      round
      class="user-img"
      >
  </van-image>
</template>

<style scoped>
.user-img{
  padding: 2px;
  border: 2px solid white;
}
</style>